79 research outputs found

    Schlagwort "Deduktive Datenbanken"

    Get PDF

    Source Code Verification for Embedded Systems using Prolog

    Full text link
    System relevant embedded software needs to be reliable and, therefore, well tested, especially for aerospace systems. A common technique to verify programs is the analysis of their abstract syntax tree (AST). Tree structures can be elegantly analyzed with the logic programming language Prolog. Moreover, Prolog offers further advantages for a thorough analysis: On the one hand, it natively provides versatile options to efficiently process tree or graph data structures. On the other hand, Prolog's non-determinism and backtracking eases tests of different variations of the program flow without big effort. A rule-based approach with Prolog allows to characterize the verification goals in a concise and declarative way. In this paper, we describe our approach to verify the source code of a flash file system with the help of Prolog. The flash file system is written in C++ and has been developed particularly for the use in satellites. We transform a given abstract syntax tree of C++ source code into Prolog facts and derive the call graph and the execution sequence (tree), which then are further tested against verification goals. The different program flow branching due to control structures is derived by backtracking as subtrees of the full execution sequence. Finally, these subtrees are verified in Prolog. We illustrate our approach with a case study, where we search for incorrect applications of semaphores in embedded software using the real-time operating system RODOS. We rely on computation tree logic (CTL) and have designed an embedded domain specific language (DSL) in Prolog to express the verification goals.Comment: In Proceedings WLP'15/'16/WFLP'16, arXiv:1701.0014

    Domain-specific languages in Prolog for declarative expert knowledge in rules and ontologies

    Get PDF
    Declarative if–then rules have proven very useful in many applications of expert sys- tems. They can be managed in deductive databases and evaluated using the well-known forward-chaining approach. For domain-experts, however, the syntax of rules becomes complicated quickly, and already many different knowledge representation formalisms ex- ist. Expert knowledge is often acquired in story form using interviews. In this paper, we discuss its representation by defining domain-specific languages (Dsls) for declarative ex- pert rules. They can be embedded in Prolog systems in internal Dsls using term expan- sion and as external Dsls using definite clause grammars and quasi-quotations – for more sophisticated syntaxes. Based on the declarative rules and the integration with the Prolog-based deductive database system DDbase, multiple rules acquired in practical case studies can be combined, compared, graphically analysed by domain-experts, and evaluated, resulting in an extensi- ble system for expert knowledge. As a result, the actual modeling Dsl becomes executable; the declarative forward-chaining evaluation of deductive databases can be understood by the domain experts. Our Dsl for rules can be further improved by integrating ontologies and rule annotations

    Intelligent Query Answering with Contextual Knowledge for Relational Databases

    Get PDF
    We are proposing a keyword-based query interface for knowledge bases - including relational or deductive databases - based on contextual background knowledge such as suitable join conditions or synonyms. Join conditions could be extracted from existing referential integrity (foreign key) constaints of the database schema. They could also be learned from other, previous database queries, if the database schema does not contain foreign key constraints. Given a textual representation - a word list - of a query to a relational database, one may parse the list into a structured term. The intelligent and cooperative part of our approach is to hypothesize the semantics of the word list and to find suitable links between the concepts mentioned in the query using contextual knowledge, more precisely join conditions between the database tables. We use a knowledge-based parser based on an extension of Definite Clause Grammars (Dcg) that are interweaved with calls to the database schema to suitably annotate the tokens as table names, table attributes, attribute values or relationships linking tables. Our tool DdQl yields the possible queries in a special domain specific rule language that extends Datalog, from which the user can choose one

    Alexa, How Can I Reason with Prolog?

    Get PDF
    As with Amazon\u27s Echo and its conversational agent Alexa, smart voice-controlled devices become ever more present in daily life, and many different applications can be integrated into this platform. In this paper, we present a framework that eases the development of skills in Prolog. As Prolog has a long history in natural language processing, we may integrate well-established techniques, such as reasoning about knowledge with Attempto Controlled English, instead of depending on example phrases and pre-defined slots

    Definite Clause Grammars with Parse Trees: Extension for Prolog

    Get PDF
    Definite Clause Grammars (DCGs) are a convenient way to specify possibly non-context-free grammars for natural and formal languages. They can be used to progressively build a parse tree as grammar rules are applied by providing an extra argument in the DCG rule\u27s head. In the simplest way, this is a structure that contains the name of the used nonterminal. This extension of a DCG has been proposed for natural language processing in the past and can be done automatically in Prolog using term expansion. We extend this approach by a meta-nonterminal to specify optional and sequences of nonterminals, as these structures are common in grammars for formal, domain-specific languages. We specify a term expansion that represents these sequences as lists while preserving the grammar\u27s ability to be used both for parsing and serialising, i.e. to create a parse tree by a given source code and vice-versa. We show that this mechanism can be used to lift grammars specified in extended Backus-Naur form (EBNF) to generate parse trees. As a case study, we present a parser for the Prolog programming language itself based only on the grammars given in the ISO Prolog standard which produces corresponding parse trees

    Declarative Rules for Annotated Expert Knowledge in Change Management

    Get PDF
    In this paper, we use declarative and domain-specific languages for representing expert knowledge in the field of change management in organisational psychology. Expert rules obtained in practical case studies are represented as declarative rules in a deductive database. The expert rules are annotated by information describing their provenance and confidence. Additional provenance information for the whole - or parts of the - rule base can be given by ontologies. Deductive databases allow for declaratively defining the semantics of the expert knowledge with rules; the evaluation of the rules can be optimised and the inference mechanisms could be changed, since they are specified in an abstract way. As the logical syntax of rules had been a problem in previous applications of deductive databases, we use specially designed domain-specific languages to make the rule syntax easier for non-programmers. The semantics of the whole knowledge base is declarative. The rules are written declaratively in an extension datalogs of the well-known deductive database language datalog on the data level, and additional datalogs rules can configure the processing of the annotated rules and the ontologies

    Querying Relational Databases with Speech-Recognition Driven by Contextual Knowledge

    Get PDF
    We are extending the keyword-based query interface DdQl for relational databases which is based on contextual background knowledge such as suitable join conditions and which was proposed in [{Dietmar Seipel, 2021]. In the previous paper, join conditions were extracted from existing referential integrity (foreign key) constraints of the database schema, or they could be learned from other, previous database queries. In this paper, we describe a speech-to-text component for entering the query keywords based on the system Whisper. Keywords, which have been recognized wrongly by Whisper can be corrected to similarly sounding words. Again, the context of the database schema can help here. For users with a limited knowledge of the schema and the contents of the database, the approach of DdQl can help to provide useful suggestions for query implementations in Sql or Datalog, from which the user can choose one. Our tool DdQl can be run in a docker image; it yields the possible queries in Sql and a special domain specific rule language that extends Datalog. The Datalog variant allows for additional user-defined aggregation functions which are not possible in Sql

    Model Generation and State Generation for Disjunctive Logic Programs

    Get PDF
    This paper investigates two fixpoint approaches for minimal model reasoning with disjunctive logic programs DB. The first one, called model generation [4], is based on an operator TI defined on sets of Herbrand interpretations, whose least fixpoint is logically equivalent to the set of minimal Herbrand models of the program. The second approach, called state generation [12], uses a fixpoint operator TS based on hyperresolution. It operates on disjunctive Herbrand states and its least fixpoint is the set of logical consequences of DB, the so--called minimal model state of the program. We establish a useful relationship between hyperresolution by TS and model generation by TI. Then we investigate the problem of continuity of the two operators TS and TI. It is known that the operator TS is continuous [12], and so it reaches its least fixpoint in at most omega steps. On the other hand, the question of whether TI is continuous has been open. We show by a counterexample that TI is not continuous. Nevertheless, we prove that it converges towards its least fixpoint in at most omega steps too, as follows from the relationship that we show exists between hyperresolution and model generation. We define an iterative version of TI that computes the perfect model semantics of stratified disjunctive logic programs. On each stratum of the program, this operator converges in at most omega steps. Model generations for the stable semantics and the partial stable (and so the well--founded semantics) are respectively achieved by using this iterative operator together with the evidential transformation [3] and the 3-S transformation [16]. (Also cross-referenced as UMIACS-TR-95-99
    • …
    corecore